import pyglet
from pyglet.gui import PushButton

from BaseScene import BaseScene

class SettingScene(BaseScene):
    def __init__(self, scene_manager):
        super().__init__(scene_manager)
        start_button = PushButton(200,
                                  200,
                                  self.pic_resources["loadbtn_pressed"],
                                  self.pic_resources["loadbtn_unpressed"],
                                  self.pic_resources["loadbtn_hover"],
                                  batch=self.batch,
                                  group=self.group3)
        start_button.set_handler("on_release", self.sss)
        self.buttons.append(start_button)

    def sss(self, button):
        print("sss")

    def on_destroy(self):
        """清理绑定的对象、解除注册等"""
        pass

    def on_draw(self):
        """绘制场景"""
        self.window.clear()
        self.batch.draw()